package com.example.rbacmanage.controller.app;

import com.example.rbacmanage.common.Result;
import com.example.rbacmanage.entity.app.PhotoFrame;
import com.example.rbacmanage.service.app.PhotoFrameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/app/photoframe")
public class AppPhotoFrameController {
    @Autowired
    private PhotoFrameService photoFrameService;

    @GetMapping("/list")
    public Result list(PhotoFrame photoFrame){
        return Result.success(photoFrameService.getAll(photoFrame));
    }


    @GetMapping("/{id}")
    public Result getInfo(@PathVariable Long id){
        return Result.success(photoFrameService.getById(id));
    }
}
